# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit git-r3 savedconfig

DESCRIPTION="slstatus is a status monitor for window managers"
HOMEPAGE="https://tools.suckless.org/slstatus/"
EGIT_REPO_URI="https://git.suckless.org/slstatus"

LICENSE="ISC"
SLOT="0"
KEYWORDS="~amd64"
IUSE="econfigs"

DEPEND="
	x11-libs/libX11
"
RDEPEND="${DEPEND}"

src_prepare() {
	default
	use econfigs && eapply "${FILESDIR}"/slstatus-misc.diff	
	restore_config config.h
}
src_compile(){
	emake clean all
}

src_install() {
	emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install

	dodoc README
	
	save_config config.h
}
